﻿using Se.Model.GameModel.Character;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SeServer.Module
{
    /// <summary>
    /// 全局事件
    /// </summary>
    public static class GameGlobalEvent
    {
        /// <summary>
        /// 创建账户
        /// </summary>
        public static event Action<Account> CreateAccount;

        public static void OnCreateAccount(Account account)
        {
            if (CreateAccount != null)
            {
                CreateAccount(account);
            }
        }

        /// <summary>
        /// 玩家登录
        /// </summary>
        public static event Action<Player> LoginPlayer;

        public static void OnLoginPlayer(Player player)
        {
            if (LoginPlayer != null) LoginPlayer(player);
        }

        /// <summary>
        /// 创建Player
        /// </summary>
        public static event Action<Player> CreatePlayer;

        public static void OnCreatePlayer(Player player)
        {
            if (CreatePlayer != null)
            {
                CreatePlayer(player);
            }
        }
    }
}
